import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
import log from '@/components/log/log.js'
import constant from '@/models/constant.js'
import loginManager from './components/login-manager/login-manager'
import favoriteManager from './components/favorite-manager/favorite-manager'
import Product from '@/models/product.js'
export function createApp() {
  const app = createSSRApp(App)
  app.config.globalProperties.$log = log
  app.config.globalProperties.$constant = constant
  app.config.globalProperties.$loginManager = loginManager
  app.config.globalProperties.$favoriteManager = favoriteManager
  app.config.globalProperties.$Product = Product
  return {
    app
  }
}
// #endif